#ifndef CONFIGMANAGER_H
#define CONFIGMANAGER_H

#include <QObject>

class ConfigManager : public QObject
{
    Q_OBJECT
public:
    static ConfigManager &getInstance();
    // 分别获取每个配置项
    QString getVersionInfo() const;    // 获取版本
    QString getAuthorInfo() const;     // 获取作者
    QString getModifyTime() const;     // 获取修改时间
private:
    ConfigManager()
    {
        loadConfigInfo("config.ini");
    }
    ConfigManager(const ConfigManager&)=delete;
    ConfigManager &operator=(const ConfigManager&)=delete;

    void loadConfigInfo(const QString& path);
    QString versionInfo;
    QString authorInfo;
    QString modifyTime;
};

#endif // CONFIGMANAGER_H

